﻿using Sgr.UPMS.Domain.Menus;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sgr.UPMS.Application.ViewModels
{
    /// <summary>
    /// 菜单视图模型
    /// </summary>
    public class OutMenuViewModel
    {
        /// <summary>
        /// 菜单ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 父级菜单ID (可选,为空或0表示顶级菜单)
        /// </summary>
        public long? ParentId { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string? Icon { get; set; }

        /// <summary>
        /// 路由名称
        /// </summary>
        public string? RouteName { get; set; }

        /// <summary>
        /// 路由路径
        /// </summary>
        public string? RoutePath { get; set; }

        /// <summary>
        /// 组件路径
        /// </summary>
        public string? ComponentPath { get; set; }

        /// <summary>
        /// 重定向
        /// </summary>
        public string? RedirectPath { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string? Permission { get; set; }

        /// <summary>
        /// 菜单类型
        /// </summary>
        public MenuType Type { get;  set; }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string? Description { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int? Order { get; set; }

        /// <summary>
        /// 是否外部链接
        /// </summary>
        public bool ExternalLink { get; set; }

        /// <summary>
        /// 是否隐藏
        /// </summary>
        public bool Hidden { get; set; }

        /// <summary>
        /// 是否启用缓存
        /// </summary>
        public bool KeepAlive { get; set; }

        /// <summary>
        /// 是否固定
        /// </summary>
        public bool Affix { get; set; }

        /// <summary>
        /// 是否激活
        /// </summary>
        public bool IsActive { get; set; }

        /// <summary>
        /// 目标窗口
        /// </summary>
        public TargetType? Target { get; set; }
    }
}